home *** CD-ROM | disk | FTP | other *** search
- //
- // MiscPickListController.m -- Controller object works with PickList
- // Written by Don Yacktman Copyright (c) 1994 by Don Yacktman.
- // Version 0.1. All rights reserved.
- //
- // This notice may not be removed from this source code.
- //
- // This object is included in the MiscKit by permission from the author
- // and its use is governed by the MiscKit license, found in the file
- // "LICENSE.rtf" in the MiscKit distribution. Please refer to that file
- // for a list of all applicable permissions and restrictions.
- //
-
- #import "MiscPickListController.h"
-
- @implementation MiscPickListController
-
- - init
- {
- pickListName = [MiscString newWithString:"States"];
- return self;
- }
-
- - free
- {
- if (pickListName) [pickListName free];
- return [super free];
- }
-
- - pickList
- {
- if (!pickList) pickList = [MiscPickList findPickListNamed:pickListName];
- return pickList;
- }
-
- - bringUpPickList:sender
- {
- return [[self pickList] popUpForTextPal:textPal];
- }
-
- - textPal { return textPal; }
- - setTextPal:anObject { textPal = anObject; return self; }
- - (MiscString *)listName { return pickListName; }
- - setListName:(MiscString *)aName
- {
- if (pickListName) [pickListName free];
- pickListName = [aName copy];
- pickList = nil;
- return self;
- }
-
- @end
-